Field of the Invention
The present invention relates to an image processing device, a method of controlling the same, and a storage medium, and more particularly to an image processing device that performs image rotation processing and image display processing.
Description of the Related Art
In recent years, in an image pickup apparatus, such as a digital camera, as the capacity of a recording medium is increased, it is desired that the image pickup apparatus enables a user to efficiently view an image desired by the user. Further, as a terminal device, such as a mobile phone or a smartphone, there has been proposed one which is equipped with a plurality of image pickup sections, such as a first image pickup section for shooting an object and a second image pickup section for shooting a photographer. In such a terminal device, a photographer and an object are shot and recorded at the same time using the plurality of image pickup sections. Further, in viewing an image shot by the terminal device, it is desired that the image pickup apparatus is capable of efficiently displaying the image including the object and the image including the photographer.
On the other hand, there has been proposed one configured to determine, before displaying an image, a vertical direction of a face area by analyzing an image shot by an in-camera which is the second image pickup section, and switch the display direction of a displayed image between portrait and landscape such that the vertical direction of the displayed image matches the determined vertical direction (see e.g. Japanese Patent Laid-Open Publication No. 2008-177819). With this control, in Japanese Patent Laid-Open Publication No. 2008-177819, the vertical direction of a displayed image is caused to match the vertical direction of the face area, independently of a posture of the user or a manner of use of the terminal device, and a manner of holding of the terminal device by the user.
However, in the terminal device described in Japanese Patent Laid-Open Publication No. 2008-477819, unless a face area of a photographer (or a viewer) is correctly within an angle of view in an image shot by the in-camera, it is impossible to cause the display direction of an image to be displayed to match e.g. a posture of the user who is a viewer.
Further, in the terminal device described in Japanese Patent Laid-Open Publication No. 2008-177819, it is difficult to subject an image including an object and an image including a photographer to rotation processing through respective desired rotation angles.